/*
 * GYPackage.h
 *
 *  Created on: 2015年9月23日
 *      Author: gaoyi
 */

#ifndef GYPACKAGE_H_
#define GYPACKAGE_H_

#include "CTBase.h"
#include "CTMsgBase.h"
#include "CTBuffer.h"
#include "PBMsgHead.pb.h"

using namespace CTLib;

class GYDecodePBPackage
{
public:
	GYDecodePBPackage()
	{

	}
	virtual ~GYDecodePBPackage()
	{

	}
public:
	int	Init();
	void Clear();
public:
	static int	DecodePBMsg(::google::protobuf::Message& stMsgBody, void* pData, int iLength);
public:
	int 	DecodeEnpMsg();
	int		DecodeClientMsg(char* pszBuf, int iSize, int iAct);
public:

private:
	CTBuffer		m_stBuffer;
	CEnpNetHead 	m_stEnpHead;
	PBMsgHead 		m_stMsgHead;
	CTCodeStream	m_stCodeStream;
};

#endif /* GYPACKAGE_H_ */
